package com.mall.goods.controller;

import com.mall.commons.utils.CommonResult;
import com.mall.goods.service.CmsPrefrenceAreaService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
@RequestMapping("/prefrenceArea")
public class CmsPrefrenceAreaController {

    @Autowired
    private CmsPrefrenceAreaService cmsPrefrenceAreaService;

    /**
     * 获取所有商品优选
     *
     * @return
     */
    @GetMapping("listAll")
    public CommonResult listAll() {
        List resultList = cmsPrefrenceAreaService.listAll();
        return CommonResult.success(resultList);
    }
}
